@model ShivamEMR.Model.Domain.PatientDomain.Consultation

@* This partial view defines form fields that will appear when creating and editing entities *@

<div class="editor-label">
    @Html.LabelFor(model => model.Title)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Title)
    @Html.ValidationMessageFor(model => model.Title)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Notes)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Notes)
    @Html.ValidationMessageFor(model => model.Notes)
</div>

<div class="editor-label">
    Doctor
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.DoctorID, ((IEnumerable<ShivamEMR.Model.Domain.DoctorsDomain.Doctor>)ViewBag.PossibleDoctors).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Title), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.DoctorID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.DoctorID)
</div>
<div class="editor-label">
    Patient
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.PatientID, ((IEnumerable<ShivamEMR.Model.Domain.PatientDomain.Patient>)ViewBag.PossiblePatients).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Title), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.PatientID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.PatientID)
</div>
<div class="editor-label">
    Treatment
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.TreatmentID, ((IEnumerable<ShivamEMR.Model.Domain.PatientDomain.PatientTreatment>)ViewBag.PossibleTreatments).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Title), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.TreatmentID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.TreatmentID)
</div>
<div class="editor-label">
    Interaction
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.InteractionID, ((IEnumerable<ShivamEMR.Model.Domain.CRMDomain.Interaction>)ViewBag.PossibleInteractions).Select(option => new SelectListItem {
        Text = Html.DisplayTextFor(_ => option).ToString(), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.InteractionID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.InteractionID)
</div>
